page.form = {};
page.form.event = {
	submit:function(dialog,callback,index){
		$('#mainForm').validate();
		var validate = $('#mainForm').valid();
		if (validate) {
			var data = $('#mainForm').serialize() // 要提交的表单,必须使用name属性
			  $.dataPost(contextPath+"/depot/custom/edit.htm",data,function(result){
				  if(result.success){
					 if(callback)callback();
					 dialog.close(index);
				  }else{
					 layer.msg(result.msg);
				  }
			  });
		}
   }		
}


